package com.app.songbump;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;


public class AppPreferences {

	private static final String APP_SHARED_PREFS = "com.app.songbump"; // 
    private SharedPreferences appSharedPrefs;
    private Editor prefsEditor;

    public AppPreferences(Context context)
    {
        this.appSharedPrefs = context.getSharedPreferences(APP_SHARED_PREFS, Activity.MODE_PRIVATE);
        this.prefsEditor = appSharedPrefs.edit();
    }

    public String getUserName() {
        return appSharedPrefs.getString("name", "");
    }

    public void saveUserName(String text) {
        prefsEditor.putString("name", text);
        prefsEditor.commit();
    }
    public String getUserId(){
    	return appSharedPrefs.getString("uid", "");
    }
    public void saveUserId(String uid){
    	prefsEditor.putString("uid", uid);
    	prefsEditor.commit();
    }
}
